#include "XLight.h"


XLight::XLight()
{
	m_type = LightType::PointLight;
	m_Ambient = Color(255, 255, 255, 255);
	m_Diffuse = Color(255, 255, 255, 255);
	m_FallOff = 1.0f;
	m_A1 = 1.0f;
	m_Range = 1000.0f;
	m_Position = Vector3(0.0f, 0.0f, 0.0f);
	m_Specular = Color(255, 255, 255, 255);
}


XLight::~XLight()
{
}

void XLight::SetLightType(LightType light){
	m_type = light;
}
LightType XLight::GetLightType(){
	return m_type;
}
void XLight::SetAmbient(Color ambient){
	m_Ambient = ambient;
}
void XLight::SetDiffuse(Color diffuse){
	m_Diffuse = diffuse;
}
void XLight::SetSpecular(Color specular){
	m_Specular = specular;
}
Color XLight::GetAmbient(){
	return m_Ambient;
}
Color XLight::GetDiffuse(){
	return m_Diffuse;
}
Color XLight::GetSpecular(){
	return m_Specular;
}
void XLight::SetPosition(Vector3 position){
	m_Position = position;
}
Vector3 XLight::GetPosistion(){
	return m_Position;
}
void XLight::SetDirection(Vector3 direction){
	m_Direction = direction;
}
Vector3 XLight::GetDirection(){
	return m_Direction;
}
void XLight::SetRange(float range){
	m_Range = range;
}
float XLight::GetRange(){
	return m_Range;
}
void XLight::SetFallOff(float falloff){
	m_FallOff = falloff;
}
float XLight::GetFallOff(){
	return m_FallOff;
}
void XLight::SetAttenuation(int n_a, float a){
	switch (n_a)
	{
	case 1:
		m_A1 = a;
		break;
	case 2:
		m_A2 = a;
		break;
	case 3:
		m_A3 = a;
		break;
	default:
		break;
	}
}
float XLight::GetAttenuation(int n_a){
	switch (n_a)
	{
	case 1:
		return m_A1;
	case 2:
		return m_A2;
	case 3:
		return m_A3;
	default:
		return m_A1;
	}
}
void XLight::SetTheta(float theta){
	m_Theta = theta;
}
float XLight::GetTheta(){
	return m_Theta;
}
void XLight::SetPhi(float phi){
	m_Phi = phi;
}
float XLight::GetPhi(){
	return m_Phi;
}

void XLight::SetLightIndex(int index){
	m_lightIndex = index;
}

int XLight::GetLightIndex(){
	return m_lightIndex;
}